/*
 * @Copyright: 2017 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.order.data.service;

import com.yyfax.pay.order.model.po.PayOrderPO;
import com.yyfax.pay.order.model.vo.PayOrderVO;

/**
 * 支付订单服务接口
 *
 * @author buyi
 * @date 2017-04-12 11:09:15
 * @since 1.0.0
 */
public interface PayOrderService {

		/**
	 * 根据主键查询实体
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:16
	 * @since 1.0.0
	 * @param id 主鍵
	 * @param merchantCode 商户编号(分表预留参数)
	 * @return
	 * @throws Exception
	 */
	public PayOrderPO queryById(int id, String merchantCode) throws Exception;

	/**
	 * 根据主键查询实体
	 * 
	 * @author buyi
	 * @date 2017-04-14 17:34:32
	 * @since v1.0.0
	 * @param payOrderId 支付订单业务主键
	 * @param merchantCode 商户编号(分表预留参数)
	 * @return
	 */
	public PayOrderPO queryByPayOrderId(String merchantCode,String payOrderId);

	/**
	 * 根据商户订单号查询
	 * 
	 * @author buyi
	 * @date 2017-04-14 18:06:56
	 * @since v1.0.0
	 * @param merchantCode
	 * @param orderId 商户订单号
	 * @return
	 */
	public PayOrderPO queryByMerchantCodeAndOrderId(String merchantCode, String orderId);

	/**
	 * 保存实体对象
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:22
	 * @since 1.0.0
	 * @param po 实体对象
	 * @return 返回业务主键
	 * @throws Exception
	 */
	public String saveAndReturnBusiKey(PayOrderPO po) throws Exception;

	/**
	 * 查询订单信息
	 * 
	 * @author buyi
	 * @date 2017-04-16 11:40:59
	 * @since v1.0.0
	 * @param payOrderId
	 * @return
	 * @throws Exception
	 */
	public PayOrderVO queryPayOrderVO(String payOrderId, String merchantCode) throws Exception;

	/**
	 * 根据商户号+商户订单号查询订单封装信息
	 * 
	 * @author jiangmy
	 * @date 2017-04-18 09:11:04
	 * @since v1.0.0
	 * @param orderId
	 * @param merchantCode
	 * @return
	 * @throws Exception
	 */
	public PayOrderVO queryPayOrderVOByOrderId(String orderId, String merchantCode) throws Exception;

}
